#include "EntityList.h"


EntityList::EntityList(void)
{

}


EntityList::~EntityList(void)
{

}

bool EntityList::CompareDrawOrder(BaseEntity* One, BaseEntity* Two)
{
	if (One->DrawOrder < Two->DrawOrder)
	{
		return true;
	}
	if (One->DrawOrder > Two->DrawOrder)
	{
		return false;
	}
	else
	{
		return One->ID < Two->ID;
	}
}

void EntityList::AddToList(BaseEntity* Ent)
{
	mList.push_back(Ent);
	mList.sort(EntityList::CompareDrawOrder);
}


